/* Modal Sheet Demo 样式 */
.modal-sheet-demo {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
  font-family:
    system-ui,
    -apple-system,
    sans-serif;
}

.demo-header {
  text-align: center;
  margin-bottom: 40px;
}

.demo-header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 16px;
}

.demo-header p {
  font-size: 1.125rem;
  color: #6b7280;
  margin: 0;
}

/* 控制面板 */
.demo-controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
  padding: 24px;
  background: #f9fafb;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.control-group label {
  font-weight: 500;
  color: #374151;
  font-size: 0.875rem;
}

.control-group select {
  padding: 8px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: white;
  font-size: 0.875rem;
  color: #374151;
}

.control-group select:focus {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
  border-color: #3b82f6;
}

.control-group input[type='checkbox'] {
  margin-right: 8px;
}

/* 操作按钮 */
.demo-actions {
  text-align: center;
  margin-bottom: 60px;
}

.demo-button {
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 200ms ease-in-out;
  border: 1px solid transparent;
}

.demo-button.primary {
  background: #3b82f6;
  color: white;
  border-color: #3b82f6;
}

.demo-button.primary:hover {
  background: #2563eb;
  border-color: #2563eb;
}

.demo-button.secondary {
  background: white;
  color: #374151;
  border-color: #d1d5db;
}

.demo-button.secondary:hover {
  background: #f9fafb;
  border-color: #9ca3af;
}

.demo-button:focus {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

/* 特性展示 */
.demo-features {
  margin-bottom: 60px;
}

.demo-features h2 {
  font-size: 2rem;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 24px;
  text-align: center;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.feature-card {
  padding: 24px;
  background: white;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition:
    transform 200ms ease-in-out,
    box-shadow 200ms ease-in-out;
}

.feature-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.feature-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 12px;
}

.feature-card p {
  color: #6b7280;
  line-height: 1.6;
  margin: 0;
}

/* 使用示例 */
.demo-usage {
  margin-bottom: 40px;
}

.demo-usage h2 {
  font-size: 2rem;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 24px;
  text-align: center;
}

.code-block {
  background: #1f2937;
  color: #f9fafb;
  padding: 24px;
  border-radius: 12px;
  overflow-x: auto;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 0.875rem;
  line-height: 1.6;
  margin: 0;
}

/* Modal 内容样式 */
.modal-content h3 {
  color: #1f2937;
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 16px;
}

.modal-content p {
  color: #6b7280;
  line-height: 1.6;
  margin-bottom: 16px;
}

.modal-content ul {
  color: #6b7280;
  line-height: 1.6;
  margin-bottom: 24px;
  padding-left: 20px;
}

.modal-content li {
  margin-bottom: 8px;
}

/* 表单样式 */
.demo-form {
  background: #f9fafb;
  padding: 20px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
}

.demo-form h4 {
  color: #1f2937;
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 16px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-weight: 500;
  color: #374151;
  margin-bottom: 6px;
  font-size: 0.875rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 0.875rem;
  color: #374151;
  box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
  border-color: #3b82f6;
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

/* Snap Points 控制样式 */
.snap-points-info {
  background: #f8f9fa;
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 16px;
  border-left: 4px solid #007bff;
}

.snap-points-info p {
  margin: 4px 0;
  font-size: 14px;
  color: #666;
}

.snap-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.snap-button {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: white;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.2s ease;
  min-width: 80px;
}

.snap-button:hover:not(:disabled) {
  background: #f0f0f0;
  border-color: #007bff;
}

.snap-button.active {
  background: #007bff;
  color: white;
  border-color: #007bff;
}

.snap-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.snap-demo-info {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 16px;
  border-radius: 12px;
  margin: 16px 0;
}

.snap-demo-info h4 {
  margin: 0 0 8px 0;
  font-size: 16px;
}

.snap-demo-info p {
  margin: 4px 0;
  font-size: 14px;
}

.snap-demo-info ul {
  margin: 8px 0 0 0;
  padding-left: 20px;
}

.snap-demo-info li {
  margin: 4px 0;
  font-size: 14px;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .modal-sheet-demo {
    padding: 20px 16px;
  }

  .demo-header h1 {
    font-size: 2rem;
  }

  .demo-controls {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 20px;
  }

  .features-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .feature-card {
    padding: 20px;
  }

  .code-block {
    padding: 16px;
    font-size: 0.8125rem;
  }
  
  .snap-controls {
    justify-content: center;
  }
  
  .snap-button {
    min-width: 70px;
    font-size: 11px;
  }
}

/* 暗色主题支持 */
@media (prefers-color-scheme: dark) {
  .modal-sheet-demo {
    background: #111827;
    color: #f9fafb;
  }

  .demo-header h1 {
    color: #f9fafb;
  }

  .demo-header p {
    color: #9ca3af;
  }

  .demo-controls {
    background: #1f2937;
    border-color: #374151;
  }

  .control-group label {
    color: #d1d5db;
  }

  .control-group select {
    background: #374151;
    border-color: #4b5563;
    color: #f9fafb;
  }

  .demo-features h2,
  .demo-usage h2 {
    color: #f9fafb;
  }

  .feature-card {
    background: #1f2937;
    border-color: #374151;
  }

  .feature-card h3 {
    color: #f9fafb;
  }

  .feature-card p {
    color: #9ca3af;
  }

  .demo-form {
    background: #374151;
    border-color: #4b5563;
  }

  .demo-form h4 {
    color: #f9fafb;
  }

  .form-group label {
    color: #d1d5db;
  }

  .form-group input,
  .form-group textarea {
    background: #4b5563;
    border-color: #6b7280;
    color: #f9fafb;
  }
}
